<template>
	<div class="header">
		<!-- 左侧 -->
		<div class="header-left">
			<span class="iconfont">&#xe605;</span>
		</div>
		<!-- 中部 -->
		<div class="header-search">
			<span class="iconfont">&#xe632;</span>
			<span>请输入城市/景点/游玩主题</span>
		</div>
		<!-- 右侧 -->
		<div class="header-right">
			<router-link to="/city">
				<!--  -->
				<label>{{city}}</label>
				<span class="iconfont">&#xe62a;</span>
			</router-link>			
		</div>
	</div>
</template>

<script>
//引入
import {mapState} from 'vuex'
export default{
	computed:{
		...mapState(['city'])
	}
}
</script>

 scoped属性:表示局部样式
<style scoped>
	.header{
		width: 100%;
		height: 0.88rem; /* 44px*/
		background-color: #17c0c8;
		color: white;
		font-size: 0.36rem; /* 18px*/
		display: flex;
		line-height: 0.88rem;
	}
	.header-search{
		flex: 1; /* 占领剩余空间*/
		background-color: white;
		height: 0.6rem;
		border-radius: 0.1rem;
		color: #e4e7ea;
		margin: 0.14rem auto;
		line-height: 0.6rem;
		font-size: 0.28rem;
	}
	.header-search .iconfont{
		margin: 0 0.2rem;
	}
	.header-left{
		width: 0.4rem; /* 0.4rem*/
		text-align: center;
		font-weight: bold;
		padding: 0px 0.2rem; /* 0.2rem*/
	}
	.header-right{
		padding: 0 0.2rem;
		width: 1.2rem; /* 1.2rem*/
	}
	.header-right label{
		font-size: 0.3rem;
	}
	.header-right .iconfont{
		font-size: 0.28rem;
		margin-left: 0.2rem;
	}
	.header-right  span{
		color: white;
	}
	.header-right  label{
		color: white;
	}
</style>
